<template>
	<view class="scrollbar">
		<scroll-view scroll-y style="height: 100%;" :style="{'--s_width':s_width, '--s_color':s_color}">
			<view><slot></slot></view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		props: {
			// 滚动条宽度
			s_width: {
				type: String,
				default: '6px',
			},
			// 滚动条颜色
			s_color: {
				type: String,
				default: '#c8c7cc',
			}
		},
	}
</script>

<style scoped lang="scss">
	.scrollbar {
		width: 100%; height: 100%;
	}
	.scrollbar ::-webkit-scrollbar {
		width: var(--s_width) !important;
		display: block;
	}
	.scrollbar ::-webkit-scrollbar-thumb {
		border-radius: 4px !important;
		background: var(--s_color) !important;
		// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
	}
</style>